package 简单;



public class 翻转二叉树 {
    public static void main(String[] args) {
        TreeNode root = new TreeNode(0);
        System.out.println(root);

    }

    public TreeNode invertTree(TreeNode root) {
        if (root==null){
            return null;
        }
        TreeNode temp = root.left;
        root.left = root.right;
        root.right = temp;

        invertTree(root.left);
        invertTree(root.right);

        return root;
    }
}
